<template>
	<view class="pay-success">
		<view class="title">
			订单支付成功
		</view>
		<view class="price">
			支付金额：{{orderInfo.totalAmount}}元
		</view>

		<view class="btn" @tap="toUser">
			个人中心
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderInfo: uni.getStorageSync('orderInfo'),
			};
		},
		methods:{
			toUser(){
				uni.switchTab({
					url:'/pages/user/user',
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.pay-success {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;

		.title {
			margin-top: 300rpx;
			font-size: 48rpx;
		}

		.price {
			margin-top: 10rpx;
			font-size: 32rpx;
		}

		.btn {
			margin-top: 600rpx;
			box-sizing: border-box;
			width: 240rpx;
			padding: 0 50rpx;
			height: 70rpx;
			border: solid 2rpx #354e44;
			color: #354e44;
			align-items: center;
			border-radius: 10rpx;
			font-size: 34rpx;
			line-height: 70rpx;
			text-align: center;
		}

		view {
			width: 100%;
			text-align: center;
		}
	}
</style>
